package com.loan.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.loan.group.UserSelectContractGroup;
import lombok.*;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;

@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
@TableName("user")
@ToString
public class User implements Serializable {
    @TableId(value = "id", type = IdType.AUTO)
    @NotNull(message = "id不能为空",groups = {UserSelectContractGroup.class})
    private Integer id;

    @NotBlank(message = "账户不能为空",groups = {UserSelectContractGroup.class})
    private String username;

    private String password;

    private String icon;
    @TableField("card_img")
    private String cardImg;
    @TableField("card_id")
    private String cardId;

    private String name;

    private String gender;

    private Integer age;

    private String address;

    private String lockd;
    @TableField("pwd_err_count")
    private Integer pwdErrCount;
    @TableField("last_login_time")
    private Date lastLoginTime;

}